/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.blogspot.codevault.csvcheck;

import java.io.*;

/**
 *
 * @author apilipenko
 */
public class Core {
    private FileInputStream sourceFileStream = null;
    
    public FileInputStream openFile(String fileName) throws FileNotFoundException, IOException {
        boolean exists = (new File(fileName)).exists();
        if (!exists) {
            throw new FileNotFoundException(String.format("File {0} not exists", fileName));
        }
        
        FileInputStream sourceFileStream = new FileInputStream(fileName);
        DataInputStream in = new DataInputStream(sourceFileStream);
        BufferedReader br = new BufferedReader(new InputStreamReader(in));
        String strLine;
        while ((strLine = br.readLine()) != null)   {
        // Print the content on the console
        System.out.println (strLine);
        }
        return null;
    }
}
